#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void Move(char pos1,char pos2)
{
	printf("  %c->%c\n", pos1, pos2);
}
void Hanuoi(int n,char pos1,char pos2,char pos3)
{
	if (n == 1)
	{
		Move(pos1, pos3);
	}
	else
	{
		Hanuoi(n - 1, pos1, pos3, pos2);
		Move(pos1,pos3);
		Hanuoi(n - 1, pos2, pos1, pos3);
	}
}
int main()
{
	Hanuoi(4,'A','B','C');
	return 0;
}